package com.bank.bank.transaction.client;

import com.bank.bank.common.base.pojo.dto.AccountDTO;
import com.bank.bank.common.base.response.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value="account-service")
public interface AccountClient {
    @GetMapping("/api/accounts/update")
    public JsonResult updateAndGetAccounts(
            @RequestParam("accountId") Integer accountId,
            @RequestParam("balance")Double balance);
    @GetMapping("/api/accounts/{id}")
    public AccountDTO getAccountById(@PathVariable("id") Integer id);
}
